<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
function fun1(){
	 var show =	document.getElementById("show");
	 var str;
	 for(var i=0;i<2;i++){
		 str += "<tr>";
		 for(var j=0;j<3;j++){
			 str += "<th>123</th>";
		 }
		 str += "</tr>";
	 }
	 console.log(str);
	 show.innerHTML = str;
	
	}
</script>
</head>
<body>
	
	<input value="增加表格" type="button" onclick="fun1();">
	<div>
	<table id="show" border="1">
	</table>
	
	</div>
	
</body>
</html>